package com.it;

public class ArrayDemo {
    public static void main(String[] args) {
        //动态数组
        int[] ints = new int[5];
        String[] strings = new String[10];

        //存储数据
        strings[0] = "hello";
        strings[1] = "world";
        strings[2] = "siri";


        //静态数组
        int[] arr = {1, 2, 3};

        //获取数组长度
        int len = arr.length;
        System.out.println("len = " + len);

        //遍历
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }
    }
}
